package com.api.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.api.dao.UserMapper;
import com.api.entity.User;
import com.api.service.UserService;

@Service
public class UserServiceImpl implements UserService{

	@Autowired
	private UserMapper userMapper;
	
	@Override
	public void add(User user) {
		user.preInsert();
		this.userMapper.insert(user);
	}

	@Override
	public User getUser(User user) {
		return this.userMapper.get(user);
	}

}
